<?php

namespace App\Admin\Repositories;

use App\Models\User as Model;
use Dcat\Admin\Repositories\EloquentRepository;

class User extends EloquentRepository
{
    /**
     * Model.
     *
     * @var string|array
     */
    protected $eloquentClass = Model::class;

    public function getGenderList($gender = null)
    {
        $lists = [0 => "未知", 1 => "男", 2 => "女"];
        if (is_null($gender)) {
            return $lists;
        } else {
            return isset($lists[$gender]) ? $lists[$gender] : "未知";
        }
    }
}
